library('data.table')

d <- fread('EMRATIO.csv')


d$year <- as.numeric(substr(d$DATE, 1, 4))
d$month <- as.numeric(substr(d$DATE, 6, 7))
d$date  <- d$year + (d$month - 1)/12

d <- d[year >= 2007]

png('epop2.png',width = 5, height = 3, units="in", res=300, pointsize=8)
par(lwd = 4)
par(cex = 1.5, family = 'Arial')
par(mfrow = c(1,1), cex = 1.5)
par(mgp=c(2.2,0.45,0), tcl=-0.4, mar=c(3.3,3.6,1.1,1.1))

plot(d$date, 1*((d$EMRATIO) - (d$EMRATIO[1])), type = 'l',
     xlim = c(2007, 2018), ylim = c(-8, 2), xlab = 'Year', 
     ylab = 'Percent Deviation from 2007')
abline(h=0, lty = 2)
dev.off()
